package com.example.mapper;

import com.example.entity.Account;
import com.example.entity.Package;
import com.example.entity.Admin;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface AdminMapper {

    List<Admin> selectAdmin(Admin admin);

    void insert(Admin admin);

    @Select("select * from `admin` where username = #{username}")
    Admin selectByUsername(String username);

    void updateById(Admin addAdmin);

    @Update("update `admin` set del_flag = 1 where id = #{id}")
    void deleteById(Integer id);

    @Select("select * from `admin` where id = #{id}")
    Admin selectById(String id);
}
